home *** CD-ROM | disk | FTP | other *** search
- Page 60,132
- TITLE BOOT2 Quick-boot for IBM-PC with hard disk
- ;
- ;*************************************************************************
- ;* QUICKBOOT - .EXE Format coding *
- ;* --------- *
- ;* *
- ;* This program causes a warm boot on an IBM-PC. It's primary *
- ;* advantage is that it bypasses the routines that reset the *
- ;* hard disk controller, thereby saving approximately 20-30 *
- ;* seconds. This comes in handy when experimenting with *
- ;* various AUTOEXEC or CONFIG.SYS changes. *
- ;* *
- ;* In addition, comparing this file with BOOT2.ASM shows the *
- ;* novice ASM programmer how to generate code in both the EXE *
- ;* and COM file formats. For a good explanation of the coding *
- ;* used in the beginning of the CODESEG see "Assembler Coding *
- ;* For The IBM PC and PC-XT" by Peter Abel, 1984, Reston Publ. *
- ;* *
- ;*************************************************************************
- ;
- ;--------------------------------------------------------------------------
- STACKSEG SEGMENT PARA STACK 'STACK'
- dw 32 dup(?)
- STACKSEG Ends
- ;--------------------------------------------------------------------------
- DATASEG SEGMENT PARA 'DATA'
- MESSAGE1 db 'Q U I C K B O O T',0dH,0aH,'$'
- MESSAGE2 db 'by Brad Stephenson',0dH,0aH,'$'
- DATASEG Ends
- ;--------------------------------------------------------------------------
- CODESEG SEGMENT PARA 'CODE'
- BEGIN PROC FAR
- Assume CS:CODESEG, DS:DATASEG, SS:STACKSEG, ES:DATASEG
- push ds ;This is the starting
- ; address of this program's
- ; PSP and must be saved to
- ; the stack.
- ;
- sub ax,ax ;Next address on stack must
- push ax ; be 0000
- mov ax,DATASEG ;Loader corrupts DS, so you
- mov ds,ax ; must re-initialize
- ;----------------- Init. ends - Code begins ----------
- mov ah,08 ;Set up to
- mov bh,00 ; ask BIOS what colors
- int 10H ; are currently set
- mov bh,ah ;Set up to
- mov ax,0600H ; clear screen
- mov cx,0000 ; to pre-existing
- mov dx,184fH ; colors.
- int 10H ;Call BIOS scroll function
- mov ah,02 ;Set up to position
- mov bh,00 ; cursor
- mov dx,0520H ; at row 5, column 32
- int 10H ;Call BIOS cursor pos. func.
- mov dx,Offset MESSAGE1 ;Print program name
- mov ah,9 ; at cursor
- int 21H ;Call DOS string disp. func.
- mov ah,02 ;Set up to position
- mov bh,00 ; cursor
- mov dx,0e1fH ; at row 14, column 31
- int 10H ;Call BIOS cursor pos. func.
- mov dx,Offset MESSAGE2 ;Print programmer's name
- mov ah,9 ; at cursor
- int 21H ;Call DOS string disp. func.
- int 19H ;Reboot
- BEGIN ENDP
- CODESEG EndS
- End BEGIN
-